
from pyramid.security import (
    Allow,
    Everyone,
    )

class RootFactory(object):
    __acl__ = [
                (Allow, Everyone, 'view'),
                (Allow, 'role:admin', 'admin_view'),
                (Allow, 'role:business', 'business_view'),
                (Allow, 'role:user', 'user_view'),
              ]

    def __init__(self, request):
        pass


USERS = {'editor':'editor',
        'viewer':'viewer'}
GROUPS = {'editor':['group:editors']}

def rolefinder(userid, request):
    return userid
    #if userid in USERS:
        #return GROUPS.get(userid, [])
